//
//  PersonChannelModel.m
//  DemoV2
//
//  Created by 董一龙 on 2022/6/25.
//

#import "PersonChannelModel.h"

@implementation ItemModel : NSObject

- (instancetype)initWithTitle:(NSString *)title imagePath:(NSString *)imagePath{
    if(self = [super init]){
        self.title = title;
        self.imagePath = imagePath;
    }
    return self;
}

@end


@interface PersonChannelModel ()

@property (nonatomic, strong, readwrite) NSMutableArray<ItemModel *> *selectedArray;
@property (nonatomic, strong, readwrite) NSMutableArray<ItemModel *> *deselectedArray;
@property (nonatomic, strong, readwrite) NSArray<NSMutableArray<ItemModel *> *> *allArray;

@end

@implementation PersonChannelModel

- (instancetype)init{
    if(self = [super init]){
        [self loadData];
    }
    return self;
}

- (void)loadData{
    self.selectedArray = [NSMutableArray arrayWithObjects:
                          [[ItemModel alloc] initWithTitle:@"奶酪" imagePath:@"nailao.png"],
                          [[ItemModel alloc] initWithTitle:@"薯片" imagePath:@"shupian.png"],
                          nil];
    self.deselectedArray = [NSMutableArray arrayWithObjects:
                          [[ItemModel alloc] initWithTitle:@"薯条" imagePath:@"shutiao.png"],
                          [[ItemModel alloc] initWithTitle:@"雪糕" imagePath:@"xuegao.png"],
                          [[ItemModel alloc] initWithTitle:@"珍珠奶茶" imagePath:@"zhenzhunaicha.png"],
                          [[ItemModel alloc] initWithTitle:@"爆米花" imagePath:@"baomihua.png"],
                          [[ItemModel alloc] initWithTitle:@"汉堡" imagePath:@"hanbao.png"],
                          [[ItemModel alloc] initWithTitle:@"咖啡" imagePath:@"kafei.png"],
                          [[ItemModel alloc] initWithTitle:@"可乐" imagePath:@"kele.png"],
                          nil];
    self.allArray = @[self.selectedArray, self.deselectedArray];
}
@end
